//
//  JPApiProxy.h
//  JPWords
//
//  Created by 梁淑婷 on 2024/4/20.
//

#import <Foundation/Foundation.h>
#import "JPNetworkingDefines.h"


NS_ASSUME_NONNULL_BEGIN

typedef void(^JPCallback)(JPURLResponse *response);


@interface JPApiProxy : NSObject

JP_SINGLETON_DEF(JPApiProxy);

- (NSNumber *)callApiWithRequest:(NSURLRequest *)request success:(JPCallback)success fail:(JPCallback)fail;
- (void)cancelRequestWithRequestID:(NSNumber *)requestID;
- (void)cancelRequestWithRequestIDList:(NSArray *)requestIDList;

@end

NS_ASSUME_NONNULL_END
